<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>南京大学职业咨询室预约平台</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='assets/i/ico_128X128.ico') }}">
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="{{ url_for('static', filename='assets/i/app-icon72x72@2x.png') }}">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="apple-touch-icon-precomposed" href="{{ url_for('static', filename='assets/i/app-icon72x72@2x.png') }}">
    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="{{ url_for('static', filename='assets/i/app-icon72x72@2x.png') }}">
    <meta name="msapplication-TileColor" content="#0e90d2">

    <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/amazeui.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/app.css', v='1.4') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/jspb.css') }}">
    <script src="{{ url_for('static', filename='assets/js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static', filename='assets/js/amazeui.min.js') }}"></script>
    <style>
    .book-tips-wrap{
        border-color:#63065f;
    }
    .consultant-section{
        margin:0 10px 10px 10px;
        padding:0 10px;
        border:1px solid #63065f;
    }
    .consultant-section-name{
        text-align:center;
        line-height:40px;
        font-size:18px;
        color:#333;
    }

    .consultant-image{
        float: left;
        margin:0 10px 0 0;
    }
     .consultant-image img{
        width:90px;
        height:90px;
     }

    .consultant-intro{
        font-size:14px;
        text-align:left;
        line-height:18px;
        height:90px;
        overflow:hidden;
        color:#333;
    }

.consultant-schedule-item-wrap{
    zoom:1;
    overflow:hidden;
    border:1px solid #ddd;
    margin:10px 0;
}
    .consultant-schedule-item-l{
        width:80%;
        height:40px;
        line-height:40px;
        float: left;
    }

    .consultant-schedule-item-r{
        width:20%;
        padding:4px 0 0 0;
        float: right;
    }

    .consultant-head {
        width: 100%;
        height: 5px;
    }

    .consultant-foot {
        width: 100%;
        height: 5px;
    }

    </style>
</head>

<body>
    <div class="header">
        <!--<div class="header-back" onclick="history.back()">返回</div>-->
        <div class="header-title">咨询师与咨询时段选择</div>
    </div>
    <div class="content">
        <div class="alert alert-warning">
        {% with messages = get_flashed_messages() %}
          {% if messages %}
            <ul class=flashes>
            {% for message in messages %}
            <div class="am-alert am-alert-secondary" data-am-alert>
              <button type="button" class="am-close">&times;</button>
              <div style="text-align: center;">{{ message }}</div>
            </div>
            {% endfor %}
            </ul>
          {% endif %}
        {% endwith %}
        </div>
         <!-- 就业指导中心全部教师排班 begin -->
        <div class="book-tips-wrap">
            <p class="book-tips-item"><strong>注意：</strong></p>
            {% for note in notes %}
            <p class="book-tips-item">{{note['seq']}}.{{note['content']|safe}}</p>
            {% endfor %}
        </div>
        <div id="all_tchs" class="kspb">
            {% for tch in tchlists %}
            <div class="consultant-head"></div>

            <div class="consultant-section">
                <a href="/get_teacher_intro_detail?id={{tch['id']}}">
                <div class="am-cf consultant-section-name" style="width:100%;">
                    <strong>{{ tch['name'] }}</strong>
                </div>
                <div class="am-cf" style="width:100%;">
                    <div class="consultant-image"><img height="90" width="90" src="{{ tch['image'] }}" alt="" /></div>
                    <div class="consultant-intro">{{tch['intro']}}</div>
                </div>
                </a>
                <div class="consultant-schedule am-cf">
                    {% for csit in tch['csitem'] %}
                    <div class="consultant-schedule-item-wrap">
                        <div class="consultant-schedule-item-l">{{csit['campus']}}&nbsp;{{csit['zxdate']}}</div>
                        <div class="consultant-schedule-item-r">
                            {% if csit['booked'] %}
                            <button class="am-btn am-btn-default am-btn-sm" value="" disabled>预约</button>
                            {% else %}
                            <button class="am-btn am-btn-primary am-btn-sm" value="{{csit['zxdate']}}" tcid="{{tch['id']}}" pbid="{{csit['id']}}" tcname="{{tch['name']}}" onClick="booking(this.value,this)">预约</button>
                            {% endif %}
                        </div>
                    </div>
                    {% endfor %}
                </div>
            </div>
            <div class="consultant-foot"></div>
            {% endfor %}
        </div>

        <!-- 就业指导中心全部教师排班 end -->
        <form class="am-form am-form-inline" role="form" name="njusub" method="post">
            {{ form.csrf_token }}
        </form>
    </div>

    <div class="footer">
    <ul>
        <li><a href="/get_teacher_schedule" class="footer-item on">预约咨询</a></li>
        <li><a href="/urgent_booking" class="footer-item">紧急咨询</a></li>
        <li><a href="/student_query_login_student" class="footer-item">我的预约</a></li>
        <li><a href="/get_consultant_story_page" class="footer-item">咨询室故事</a></li>
         <li><a href="/index" class="footer-item">返回首页</a></li>
    </ul>
    </div>
    
    <script type="text/javascript">

    function booking(val,obj)
    {
        document.njusub.action="/get_login_student_page?tcid="+$(obj).attr("tcid")+"&pbid="+$(obj).attr("pbid");
        document.njusub.method="post";
        document.njusub.submit();
    }

    </script>
</body>

</html>
